import { defHttp,jsonHttp } from '@/utils/http/axios';
import {  BasicDataResult } from '../model/baseModel';

import { ErrorMessageMode } from '#/axios';

enum Api {
  //Login = '/login',
  deptList = '/hl/ex/iot/deptList',
  deptSave='/hl/ex/iot/deptSave',
  deptSelectList='/hl/ex/iot/deptSelectList',
  locationList='/hl/ex/iot/locationList',
  locationSelectList='/hl/ex/iot/locationSelectList',
  locationEdit='/hl/ex/iot/locationEdit',
  locationAdd='/hl/ex/iot/locationAdd',
  locationDelete='/hl/ex/iot/locationDelete',
  gatewayList='/hl/ex/iot/gatewayList',
  gatewayEdit='/hl/ex/iot/gatewayEdit',
  gatewayAdd='/hl/ex/iot/gatewayAdd',
  gatewayDelete='/hl/ex/iot/gatewayDelete',
  gatewayFindBadLabel='/hl/ex/iot/gatewayFindBadLabel',

  shelfList='/hl/ex/iot/shelfList',
  shelfSave='/hl/ex/iot/shelfSave',
  shelfDelete='/hl/ex/iot/shelfDelete',
  shelfSelectList='/hl/ex/iot/shelfSelectList',

  msLogList='/hl/ex/iot/msLogList',
  msLogDetail='/hl/ex/iot/msLogDetail',
  testAgainOpenByLog='/hl/ex/iot/testAgainOpenByLog',
  sendLogs='/hl/ex/iot/sendLogs',
  cleanLogs='/hl/ex/iot/cleanLogs',

  iotTagList='/hl/ex/iot/iotTagList',
  iotTagSave='/hl/ex/iot/iotTagSave',
  iotTagOpen='/hl/ex/iot/iotTagOpen',
  iotTagClose='/hl/ex/iot/iotTagClose',
  iotTagDelete='/hl/ex/iot/iotTagDelete',
  iotAllCloseTag='/hl/ex/iot/iotAllCloseTag',

  modeList='/hl/ex/iot/modeList',
  modeEdit='/hl/ex/iot/modeEdit',
  modeAdd='/hl/ex/iot/modeAdd',
  modeDelete='/hl/ex/iot/modeDelete',

  bgTagList='/hl/ex/iot/bgTagList',
  bgTagAdd='/hl/ex/iot/bgTagAdd',
  bgTagEdit='/hl/ex/iot/bgTagEdit',
  bgTagDelete='/hl/ex/iot/bgTagDelete',
  bgTagImport='/hl/ex/iot/bgTagImport',

  logList='/hl/ex/iot/logList',

}

/**
 * @description: user login api
 */
export function deptList(params: any, mode: ErrorMessageMode = 'modal') {
  return jsonHttp.post<BasicDataResult>(
    {
      url: Api.deptList,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}

export function deptSave(params: any, mode: ErrorMessageMode = 'modal') {
  return jsonHttp.post<BasicDataResult>(
    {
      url: Api.deptSave,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}


export function deptSelectList(params: any, mode: ErrorMessageMode = 'modal') {
  return jsonHttp.post<BasicDataResult>(
    {
      url: Api.deptSelectList,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}

export function locationList(params: any, mode: ErrorMessageMode = 'modal') {
  return jsonHttp.post<BasicDataResult>(
    {
      url: Api.locationList,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}

export function locationSelectList(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.locationSelectList,params, },{errorMessageMode: mode,},);}
export function locationEdit(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.locationEdit,params, },{errorMessageMode: mode,},);}
export function locationAdd(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.locationAdd,params, },{errorMessageMode: mode,},);}
export function locationDelete(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.locationDelete,params, },{errorMessageMode: mode,},);}
export function gatewayList(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.gatewayList,params, },{errorMessageMode: mode,},);}
export function gatewayEdit(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.gatewayEdit,params, },{errorMessageMode: mode,},);}

export function gatewayAdd(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.gatewayAdd,params, },{errorMessageMode: mode,},);}

export function gatewayDelete(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.gatewayDelete,params, },{errorMessageMode: mode,},);}
export function gatewayFindBadLabel(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.gatewayFindBadLabel,params, },{errorMessageMode: mode,},);}

export function shelfList(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.shelfList,params, },{errorMessageMode: mode,},);}
export function shelfSave(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.shelfSave,params, },{errorMessageMode: mode,},);}
export function shelfDelete(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.shelfDelete,params, },{errorMessageMode: mode,},);}

export function msLogList(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.msLogList,params, },{errorMessageMode: mode,},);}
export function msLogDetail(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.msLogDetail,params, },{errorMessageMode: mode,},);}
export function testAgainOpenByLog(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.testAgainOpenByLog,params, },{errorMessageMode: mode,},);}
export function sendLogs(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.sendLogs,params, },{errorMessageMode: mode,},);}
export function cleanLogs(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.cleanLogs,params, },{errorMessageMode: mode,},);}

export function iotTagList(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.iotTagList,params, },{errorMessageMode: mode,},);}
export function iotTagSave(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.iotTagSave,params, },{errorMessageMode: mode,},);}
export function iotTagOpen(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.iotTagOpen,params, },{errorMessageMode: mode,},);}
export function iotTagClose(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.iotTagClose,params, },{errorMessageMode: mode,},);}
export function iotAllCloseTag(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.iotAllCloseTag,params, },{errorMessageMode: mode,},);}


export function iotTagDelete(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.iotTagDelete,params, },{errorMessageMode: mode,},);}


export function shelfSelectList(params: any, mode: ErrorMessageMode = 'modal') {return defHttp.post<BasicDataResult>({url: Api.shelfSelectList,params, },{errorMessageMode: mode,},);}


export function modeList(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.modeList,params, },{errorMessageMode: mode,},);}
export function modeEdit(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.modeEdit,params, },{errorMessageMode: mode,},);}
export function modeAdd(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.modeAdd,params, },{errorMessageMode: mode,},);}
export function modeDelete(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.modeDelete,params, },{errorMessageMode: mode,},);}

export function bgTagList(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.bgTagList,params, },{errorMessageMode: mode,},);}

export function bgTagEdit(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.bgTagEdit,params, },{errorMessageMode: mode,},);}
export function bgTagAdd(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.bgTagAdd,params, },{errorMessageMode: mode,},);}
export function bgTagDelete(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.bgTagDelete,params, },{errorMessageMode: mode,},);}
export function bgTagImport(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.bgTagImport,params, },{errorMessageMode: mode,},);}

export function logList(params: any, mode: ErrorMessageMode = 'modal') {return jsonHttp.post<BasicDataResult>({url: Api.logList,params, },{errorMessageMode: mode,},);}






